package com.ericsson.enap.modules.autoCheck.service.impl;

import com.ericsson.enap.modules.autoCheck.service.EopsAlarmPlatformService;
import com.ericsson.enap.modules.procLog.entity.EnipAlarmPlatformConfig;
import com.ericsson.enap.modules.procLog.entity.EnipAlarmPlatformMonitor;
import com.ericsson.enap.modules.procLog.mapper.EnipAlarmPlatformConfigMapper;
import com.ericsson.enap.modules.procLog.mapper.EnipAlarmPlatformMonitorMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class EopsAlarmPlatformServiceImpl implements EopsAlarmPlatformService {

    @Resource
    private EnipAlarmPlatformConfigMapper enipAlarmPlatformConfigMapper;

    @Resource
    private EnipAlarmPlatformMonitorMapper enipAlarmPlatformMonitorMapper;

    @Override
    public List<EnipAlarmPlatformConfig> getAlarmPlatformConfigList(EnipAlarmPlatformConfig config) {
        return enipAlarmPlatformConfigMapper.selectEnipAlarmPlatformConfigList(config);
    }

    @Override
    public List<EnipAlarmPlatformMonitor> getMonitorList(EnipAlarmPlatformMonitor monitor) {
        return enipAlarmPlatformMonitorMapper.selectEnipAlarmPlatformMonitorList(monitor);
    }

    @Override
    public void insertAutoCheckMonitor(EnipAlarmPlatformMonitor enipAlarmPlatformMonitor) {
        enipAlarmPlatformMonitorMapper.insertEnipAlarmPlatformMonitor(enipAlarmPlatformMonitor);
    }

    @Override
    public void updateAutoCheckMonitor(EnipAlarmPlatformMonitor enipAlarmPlatformMonitor) {
        enipAlarmPlatformMonitorMapper.updateEnipAlarmPlatformMonitor(enipAlarmPlatformMonitor);
    }
}
